<div class="row RowSpace" style="margin-bottom:20px;">
  <div class="LableDiv" style="width:50px;"><Btn class="BtnSave" value="保存" ng-click="btnSave()"></Btn></div>
  <div class="LableDiv" style="width:60px;"><Btn value="放弃" ng-click="btnCancel()"></Btn></div>
  <div class="LableDiv" style="width:50px;"><Btn class="BtnAdd" value="新增" ng-click="btnAdd()"></Btn></div>
  <div class="LableDiv" style="width:60px;"><Btn class="BtnDelete" value="删除" ng-click="btnDelete()"></Btn></div>
  <div class="LableDiv" style="width:50px;">
    <BtnFind DisplayName="查找" WindowTitle="调度请求" module="Module.ScheduleRequest">
      <FColumn type="0" width="150px" displayname="编码" valuefield="Code"></FColumn>
      <FColumn type="textbox" width="100px" displayname="名称" valuefield="Name"></FColumn>
      <FColumn Type="Textbox" Width="100px" DisplayName="调度方案" ValueField="ScheduleProgram.Name"></FColumn>
      <FColumn Type="Textbox" Width="100px" DisplayName="调度程序" ValueField="Scheduler.Name"></FColumn>
      <FColumn Type="Textbox" Width="200px" DisplayName="备注" ValueField="Remark"></FColumn>
    </BtnFind>
  </div>
  <div class="LableDiv" style="width:60px;"><Btn value="列表" ng-click="btnList()"></Btn></div>
  <PageButton module="Module.ScheduleRequest"></PageButton>
</div>
<div class="row RowSpace">
  <div class="LableDiv"><Label IsEmpty="false">编码</Label></div>
  <div class="InputDiv"><TextBox value="Module.ScheduleRequest.FocusedRecord.Code" isempty="false"></TextBox></div>
  <div class="LableDiv"><Label IsEmpty="false">名称</Label></div>
  <div class="InputDiv"><TextBox value="Module.ScheduleRequest.FocusedRecord.Name"></TextBox></div>
  <div class="LableDiv"><Label IsEmpty="false">调度方案</Label></div>
  <div class="InputDiv">
    <Refer EntityName="ScheduleProgram" WindowTitle="调度方案" value="Module.ScheduleRequest.FocusedRecord.ScheduleProgram">
      <RColumn Type="TextBox" Width="150px" DisplayName="编码" ValueField="Code"></RColumn>
      <RColumn Type="TextBox" Width="150px" DisplayName="名称" ValueField="Name"></RColumn>
      <RColumn Type="Calendar" DisplayName="首次执行时间" Width="90px" ValueField="FirstTime"></RColumn>
      <RColumn Type="DropDownList" DisplayName="结束方式" Width="100px" ValueField="EndMode" Enum="EndModeEnum"></RColumn><RColumn Type="Calendar" DisplayName="结束时间" Width="100px" ValueField="EndTime"></RColumn>
      <RColumn Type="NumberBox" Round="{Precision: 0}" DisplayName="重复次数" Width="60px" ValueField="RepeatTimes"></RColumn> 
      <RColumn Type="CheckBox" DisplayName="系统预置" width="60px" ValueField="IsSystem"></RColumn>
    </Refer>
  </div>
  <div class="LableDiv"><Label IsEmpty="false">调度程序</Label></div>
  <div class="InputDiv">
    <Refer EntityName="Scheduler" WindowTitle="调度程序" value="Module.ScheduleRequest.FocusedRecord.Scheduler">
      <RColumn Type="TextBox" Width="100px" DisplayName="编码" ValueField="Code"></RColumn>
      <RColumn Type="TextBox" Width="100px" DisplayName="名称" ValueField="Name"></RColumn>
      <RColumn Type="TextBox" Width="386px" DisplayName="备注" ValueField="Remark"></RColumn>
    </Refer>
  </div>
</div>
<div class="row RowSpace">
  <div class="LableDiv"><Label>状态</Label></div>
  <div class="InputDiv"><DropDownList Enabled="false" value="Module.ScheduleRequest.FocusedRecord.Status" Enabled="false" enum="ScheduleStatusEnum"></DropDownList></div>
  <div class="LableDiv"><Label>提交人</Label></div>
  <div class="InputDiv"><TextBox Enabled="false" value="Module.ScheduleRequest.FocusedRecord.Submitter"></TextBox></div>
  <div class="LableDiv"><Label>最后请求时间</Label></div>
  <div class="InputDiv"><Calendar Enabled="false" value="Module.ScheduleRequest.FocusedRecord.LastRequestTime"></Calendar></div>
  <div class="LableDiv"><Label>执行次数</Label></div>
  <div class="InputDiv"><NumberBox Enabled="false" value="Module.ScheduleRequest.FocusedRecord.ExecuteTimes"></NumberBox></div>
</div>
<div class="row RowSpace">
  <div class="LableDiv"><Label>备注</Label></div>
  <div class="InputDiv" style="height:80px;"><TextareaBox value="Module.ScheduleRequest.FocusedRecord.Remark"></div>
</div>
<div class="row RowSpace LastRow">
  <div style="display:flex;position: absolute;bottom:0;">
    <div class="LableDiv" style="width:80px;"><Btn value="提交请求" Enabled="{{Module.ScheduleRequest.FocusedRecord.Status == ScheduleStatusEnum.No.Value && Module.ScheduleRequest.FocusedRecord.RowStatus == RowStatusEnum.UnChange.Value}}" ng-click="btnSubmitRequest()"></Btn></div>
    <div class="LableDiv" style="width:80px;"><Btn value="取消请求" Enabled="{{Module.ScheduleRequest.FocusedRecord.Status == ScheduleStatusEnum.Wait.Value}}" ng-click="btnCancelRequest()"></Btn></div>
    <div class="LableDiv" style="width:80px;">
      <ModalBox Text="执行结果" WindowTitle='调度请求执行结果' width="800px" beforeshow="btnMonitorInfo()" Enabled="{{Module.ScheduleRequest.FocusedRecord.RowStatus != RowStatusEnum.Insert.Value}}" IsDisplayOKBtn="false">
        <div class="row RowSpace LastRow">
          <DataGrid module="Module.ScheduleMonitor" IsEdit="false" IsAutoLoad="false" height="400px">
              <Column Type="CheckBox" DisplayName="执行成功" width="70px" ValueField="IsSuccess"></Column>
              <Column Type="Calendar" DisplayName="开始时间" width="140px" ValueField="StartTime"></Column>
              <Column Type="Calendar" DisplayName="结束时间" width="140px" ValueField="EndTime"></Column>
              <Column Type="TextBox" DisplayName="异常信息" width="436px" ValueField="Exception"></Column>
          </DataGrid>
        </div>
      </ModalBox>
    </div>
  </div>
</div>
